package com.github.jspxnet.worktask.core.node;

import com.github.jspxnet.worktask.model.dto.ProcessResponse;

/**
 * 完全的流程驳回到为开始状态
 */
public class CleanFlowNodeAction  extends BaseNodeAction {
    @Override
    public ProcessResponse<?> execute() {
        try {
            runtimeServiceDAO.deleteWorkTask(workTaskParam.getFlowNo(),workTaskParam.getNamespace(),workTaskParam.getDocumentNo());
            return ProcessResponse.success(null);
        } catch (Exception e) {
            e.printStackTrace();
            return ProcessResponse.error(e.getMessage());
        }
    }
}
